package com.deepface.system.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.deepface.common.utils.DateUtils;
import com.deepface.common.utils.SecurityUtils;
import com.deepface.system.domain.SysFaceJobGroup;
import com.deepface.system.mapper.SysFaceJobMapper;
import com.deepface.system.service.SysFaceJobGroupService;
import com.deepface.system.mapper.SysFaceJobGroupMapper;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;

/**
* @author 74707
* @description 针对表【sys_face_job_group(换脸任务组表)】的数据库操作Service实现
* @createDate 2023-12-19 21:02:22
*/
@Service
public class SysFaceJobGroupServiceImpl extends ServiceImpl<SysFaceJobGroupMapper, SysFaceJobGroup>
    implements SysFaceJobGroupService{

  @Resource
  SysFaceJobGroupMapper sysFaceJobGroupMapper;

  @Override
  public int insertSysFaceJobGroup(SysFaceJobGroup sysFaceJobGroup) {
    Long id = SecurityUtils.getUserId();
    String name = SecurityUtils.getUsername();
    sysFaceJobGroup.setUserId(id);
    sysFaceJobGroup.setCreateBy(name);
    sysFaceJobGroup.setCreateTime(DateUtils.getNowDate());
    return sysFaceJobGroupMapper.insert(sysFaceJobGroup);
  }
}




